package com.amazon.ags.client;

import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.amazon.ags.api.AmazonGamesCallback;
import com.amazon.ags.api.AmazonGamesStatus;

public class AmazonGamesStatusHandler extends Handler
{
  private static final String FEATURE_NAME = "AGC";
  private static final String TAG = "AGC_" + AmazonGamesStatusHandler.class.getSimpleName();
  private AmazonGamesCallback amazonGamesCallback;

  public AmazonGamesStatusHandler(AmazonGamesCallback paramAmazonGamesCallback)
  {
    this.amazonGamesCallback = paramAmazonGamesCallback;
  }

  public final void handleMessage(Message paramMessage)
  {
    if ((paramMessage.obj instanceof AmazonGamesStatus))
    {
      AmazonGamesStatus localAmazonGamesStatus = (AmazonGamesStatus)paramMessage.obj;
      Log.i(TAG, "Game received status update of: " + localAmazonGamesStatus);
      if (this.amazonGamesCallback == null)
        return;
      if (localAmazonGamesStatus == AmazonGamesStatus.SERVICE_CONNECTED)
      {
        this.amazonGamesCallback.onServiceReady();
        return;
      }
      this.amazonGamesCallback.onServiceNotReady(localAmazonGamesStatus);
      return;
    }
    Log.e(TAG, "Expecting message object of AmazonGamesStatus, received: " + paramMessage.obj);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.client.AmazonGamesStatusHandler
 * JD-Core Version:    0.6.2
 */